#include "GSM.h"

uint8 GSM::end(void)
{
	Port->end();
	return 0;
}

void GSM::power(uint8 pin, uint8 polarity)
{
	PowerPin = pin;
	PowerPinPolarity = polarity;
}

void GSM::powerOn(void)
{
	if (PowerPin == 0)
		return;

	if (PowerPinPolarity == 0)
		digitalWrite(PowerPin, HIGH);
	else
		digitalWrite(PowerPin, LOW);
}

void GSM::powerOff(void)
{
	if (PowerPin == 0)
		return;

	if (PowerPinPolarity == 0)
		digitalWrite(PowerPin, LOW);
	else
		digitalWrite(PowerPin, HIGH);
}
